package cn.edu.gdut.csq.service;

import java.util.List;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.edu.gdut.csq.dao.CompanyDao;
import cn.edu.gdut.csq.entity.Companyinfo;
import cn.edu.gdut.csq.entity.PageSet;

@Service
public class CompanyService {

	@Autowired
	private CompanyDao companyDao;

	public PageSet<Companyinfo> getCompanys(Integer pageNow, Integer pageSize, String queryType, Integer state) {
		// TODO Auto-generated method stub
		return companyDao.getCompanyinfos(pageNow, pageSize, queryType, state);
	}

	public PageSet<Companyinfo> getCompanyinfos(Integer pageNow, Integer pageSize,
			String time, String queryType, Integer state) {
		// TODO Auto-generated method stub
		return companyDao.getCompanyinfos(pageNow, pageSize, time, queryType, state);
	}

	public List<Companyinfo> exportCompanyinfos(String time, String queryType, Integer state) {
		return companyDao.exportCompanyinfos(time, queryType, state);
	}

	public boolean changeState(Integer companyId) {
		// TODO Auto-generated method stub
		return companyDao.changeState(companyId);
	}
}
